import { skuOriginalOptions } from './skuOptionsList';
// 商品中心 - 商品管理 - SPU|SKU管理 - 查看页面
export const PACKAGE_TABLE_COLUMNS = [
  {
    title: 'SKU编码',
    key: 'skuNo',
    fixed: 'left',
  },
  {
    title: '销售属性',
    key: 'specDetailStr',
  },
  {
    title: '加价类型',
    key: 'addPriceTypeStr',
  },
  {
    title: '是否国标',
    key: 'nationalStandardStr'
  },
  {
    title: '是否畅销',
    key: 'sellWellFlagStr'
  },
  {
    title: '安全率上限',
    key: 'safeRateUpperLimit'
  },
  {
    title: '安全率下限',
    key: 'safeRateLowerLimit'
  },
  {
    title: '最小起售量',
    key: 'saleMin',
  },
  {
    title: '销售限制类型',
    key: 'saleRestrictStr',
  },
  {
    title: '商品信息备注',
    key: 'skuRemark',
  },
  {
    title: '包装清单',
    key: 'packageContents',
  },
  {
    title: '产地',
    key: 'producingAreaName'
  },
  {
    title: 'Sku来源',
    render: (h, { row }) => {
      const target = skuOriginalOptions.find(item => item.value === row.skuSource) ?? {}
      return <span>{ target?.label ?? '' }</span>
    }
  },
  {
    title: '来源详情',
    key: 'skuSourceDesc',
  },
  {
    title: '商品条形码',
    key: 'barcode',
  },
  {
    title: '存量属性',
    key: 'logisticsStock',
  },
  {
    title: '件装数量',
    key: 'pieceInfo',
  },
  {
    title: '单品包装',
    align: 'center',
    width: 120,
    children: [
      {
        title: '包装单位',
        key: 'singlePackageUnit',
      },
      {
        title: '包装数量',
        key: 'singlePackageCount',
      },
      {
        title: '最长边(cm)',
        key: 'singleEdge1',
      },
      {
        title: '次长边(cm)',
        key: 'singleEdge2',
      },
      {
        title: '最短边(cm)',
        key: 'singleEdge3',
      },
      {
        title: '体积(m³)',
        key: 'singleVolume',
      },
      {
        title: '重量(kg)',
        key: 'singleWeight',
      }
    ]
  },
  {
    title: '一层包装（小包装）',
    align: 'center',
    width: 120,
    children: [
      {
        title: '包装单位',
        key: 'onePackageUnit',
      },
      {
        title: '包装数量',
        key: 'onePackageCount',
      },
      {
        title: '最长边(cm)',
        key: 'oneEdge1',
      },
      {
        title: '次长边(cm)',
        key: 'oneEdge2',
      },
      {
        title: '最短边(cm)',
        key: 'oneEdge3',
      },
      {
        title: '体积(m³)',
        key: 'oneVolume',
      },
      {
        title: '重量(kg)',
        key: 'oneWeight',
      }
    ]
  },
  {
    title: '二层包装（中包装）',
    align: 'center',
    width: 120,
    children: [
      {
        title: '包装单位',
        key: 'twoPackageUnit',
      },
      {
        title: '包装数量',
        key: 'twoPackageCount',
      },
      {
        title: '最长边(cm)',
        key: 'twoEdge1',
      },
      {
        title: '次长边(cm)',
        key: 'twoEdge2',
      },
      {
        title: '最短边(cm)',
        key: 'twoEdge3',
      },
      {
        title: '体积(m³)',
        key: 'twoVolume',
      },
      {
        title: '重量(kg)',
        key: 'twoWeight',
      }
    ]
  },
  {
    title: '三层包装（大包装）',
    align: 'center',
    children: [
      {
        title: '包装单位',
        key: 'threePackageUnit',
      },
      {
        title: '包装数量',
        key: 'threePackageCount',
      },
      {
        title: '最长边(cm)',
        key: 'threeEdge1',
      },
      {
        title: '次长边(cm)',
        key: 'threeEdge2',
      },
      {
        title: '最短边(cm)',
        key: 'threeEdge3',
      },
      {
        title: '体积(m³)',
        key: 'threeVolume',
      },
      {
        title: '重量(kg)',
        key: 'threeWeight',
      }
    ]
  }
]
